package com.example.yuecvideo.utils;

import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.widget.Toast;

import java.util.Objects;

public class ToastUtil {
    public static boolean Empty(String checkStr, String ob, Context ctx) {
        Handler handler = new Handler();
        if (StringUtil.isEmpty(checkStr)) {
            String str = ob + "为空";
            int duration = Toast.LENGTH_SHORT;
            Toast toast = Toast.makeText(ctx, str, duration);
            toast.show();
            return true;
        }
        return false;


    }

    public static boolean NotSync(String str1, String str2, String ob, Context ctx) {
        if (!Objects.equals(str1, str2)) {
            String str = ob + "不匹配";
            int duration = Toast.LENGTH_SHORT;
            Toast toast = Toast.makeText(ctx, str, duration);
            toast.show();
            return true;
        }
        return false;
    }

    public static void ShowText(String str, Context ctx) {
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(ctx, str, duration);
        toast.show();
    }

}
